package org.canaan.auth2.dao.impl;

import java.util.HashMap;
import java.util.Map;

import org.canaan.auth2.dao.UserDao;
import org.canaan.auth2.entity.User;

public class UserDaoImpl extends AbstractMybatisDao<User> implements UserDao {

	@Override
	public User selectById(String fId) {
		Map<String, Object> param = new HashMap<>();
		param.put("fId_eq", fId);
	    User user = this.sqlSession.selectOne(this.nameSpace+".selectList",param);
		
		return  user;
	}

	@Override
	public User selectByAccount(String account) {
		Map<String, Object> param = new HashMap<>();
		param.put("fAccount_eq", account);
		param.put("fPassword_show", true);
		 User user = this.sqlSession.selectOne(this.nameSpace+".selectList",param);
		return user;
	}


}
